/********************************************************************
	created:	2012/12/29   14:56
	file base:	Camera
	file ext:	cpp
	author:		$wuxfei@gmail.com$
*********************************************************************/

// Camera.cpp : Defines the initialization routines for the DLL.
//

#include "stdafx.h"
#include <afxdllx.h>

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif


/*
static GdiplusStartupInput m_gdiplusStartupInput;
static ULONG_PTR m_pGdiToken;
*/
static AFX_EXTENSION_MODULE CameraDLL = { NULL, NULL };


extern "C" int APIENTRY
DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
{
	UNREFERENCED_PARAMETER(lpReserved);

	if (dwReason == DLL_PROCESS_ATTACH)
	{
		TRACE0("CAMERA.DLL Initializing!\n");
		
		if (!AfxInitExtensionModule(CameraDLL, hInstance))
			return 0;
		/*GdiplusStartup(&m_pGdiToken,&m_gdiplusStartupInput,NULL);*/ 
		new CDynLinkLibrary(CameraDLL);
	}
	else if (dwReason == DLL_PROCESS_DETACH)
	{
		/*GdiplusShutdown(m_pGdiToken);*/ 
		TRACE0("CAMERA.DLL Terminating!\n");
		AfxTermExtensionModule(CameraDLL);
	}
	return 1;
}
